cisco-cvp-ux icon

cisco-cvp-ux

(0 reviews)

Get PaymentMethod - TMF670 GET

GET

This operation gets payment information.

URL

http://[host]:[port]/cisco-cvp-ux/v1/{businessId}/paymentMethod

Common Parameters

Base URI parameters and headers are common to all the resources as part of payment-methods Biz API, listed below with details.

Base URI Parameter

NameTypeM/ODescription
businessIdstringMBusiness unit identifier.
Example: PR

Query Parameter

NameTypeM/ODescription
accountIdstringOAria AccountId of the customer
accountId.relatedParty.idstringOPhone Number of the customer

Note : Either of above query parameters should be sent

Headers

NameTypeM/ODescription
X-Correlation-IDstringMThis is a unique identifier for the current call chain that can be used to tie together log entries on multiple layers.
Example: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b
lobstringMThe Line of Business Identifier currently available are: FIXED, POSTPAID or PREPAID
channelIdstringOChannel to identify the business group. Ex: ivrB2C

Security Headers

NameTypeM/ODescription
client_idstringMClient Id value for Client Id Enforcement policy. Environment Specific Value. Eg: 6f0ed16a7b494d76b2d60e05bc3b3332
client_secretstringMClient secret value for Client Id Enforcement policy. Environment Specific Value, eg: e4CD4D43449846aA9D8Cb9c43fAd324a

Response

Possible response success

This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.

Success Response
[
    {
        "id": "2",
        "token": "cGF5bWVudG1ldGhvZF9jY19tMHpxNTl6cQ",
        "@type": "Tokenised Credit Card",
        "@baseType": "paymentMethod",
        "account": [
            {
                "id": "31516278-31514752",
                "@type": "BillingAccount",
                "ratingType": "Prepaid",
                "autopayEnabled": "true"
            }
        ],
        "relatedParty": [
            {
                "name": "BrainTreeToken",
                "@type": "paymentGatewayType"
            }
        ],
        "autopayEnabled": "true"
    }
]
Definitions
nametypedescriptionrequired
idstringUnique Identifier within the server for the payment method.N
tokenstringtoken details of a tokenized bank cardN
@typestringType of payment methodN
@baseTypestringit is the payment methodN
accountarrayReference to the accounts that are linked to the payment method.. A account may be a party account or a financial account.N
account.idstringUnique identifier of the accountN
account.'@type'stringtype of the accountN
account.namestringName of the accountN
account.ratingTypestringName of the ratingTypeN
account.autopayEnabledstringfield which tells whether account has autopay is enabled or notN
relatedPartyarrayInformation about an associated entity and its role. Account that owns the payment methodN
relatedParty.namestringname of the related partyN
relatedParty.@typestringType of partyN
autopayEnabledstringfield which tells whether payment method has autopay is enabled or notN

Possible error response

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400,
      "message" : "The request is invalid or not properly formed.",
      "description" : "The client sent too many requests and server is not able to serve them all at the moment"
    }]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }]
}
[ 403 ]

Forbidden - Indicates that the server understood the request but refuses to fulfill it. If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials.

[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method PATCH not allowed for : /{businessId}/paymentMethod"
        }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "The request failed due to an internal error.",
      "description": "error description"
    }
  ]
}
[ 501 ]

Check for the other BU Flows, if not implemented then throw a standard error message as below.

{
    "errors": [
        {
            "code": 501,
            "message": "NOT_IMPLEMENTED",
            "description": "Operation GET /paymentMethod for Business Id: SX not implemented"
        }
    ]
}
[ 503 ]

Service Unavailable

    {
    "errors": [
        {
            "code": 503,
            "message": "HTTP:SERVICE_UNAVAILABLE",
            "description": "HTTP GET on resource 'http://0.0.0.0:9092/cisco-cvp-ux/v1/PR/paymentMethod' failed: service unavailable (503)."
        }
    ]
}

Reviews